Getting this error in rails: `ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))`
Posted
by
Victor S
on Stack Overflow
See other posts from Stack Overflow
or by Victor S
Published on 2012-10-25T04:58:45Z
Indexed on
2012/10/25
5:00 UTC
Read the original article
Hit count: 215
ruby-on-rails
|utf-8
I've started getting the following error in one of my views for some reason, I don't get it in development, but only in production.
Here is a snippet of the backtrace, any ideas?
ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)):
19: [title, summary.gsub(/^/, " "), nil].join("\n\n")
20: end
21: end.join
22: sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
23: %>
24:
25: <%= raw sections %>
© Stack Overflow or respective owner